package org.raymond.icloud.apis.admin.vo.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.raymond.icloud.apis.admin.entity.enums.StateEnum;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
@Data
public class SysPermissionVO implements Serializable {
    @ApiModelProperty(name="id", value = "权限Id", dataType="Long")
    @EqualsAndHashCode.Include
    private Long id;

    @ApiModelProperty(name="parentId", value = "父级Id", dataType="Long")
    private Long parentId;

    @ApiModelProperty(name="name", value = "界面权限名,对应权限类型: 菜单路径,操作类型,数据列名", dataType="String")
    @NotEmpty(message = "name不能为空")
    private String name;

    @ApiModelProperty(name="service", value = "服务权限名,操作对应的后端服务,菜单无值", dataType="String")
    @NotEmpty(message = "service不能为空")
    private String service;

    @ApiModelProperty(name="display", value = "权限显示名称", dataType="String")
    @NotEmpty(message = "display不能为空")
    private String display;

    @ApiModelProperty(name="code", value = "权限资源编码", dataType="String")
    @NotEmpty(message = "code不能为空")
    private String code;

    @ApiModelProperty(name="type", value = "权限类型, 0-菜单,1-操作,2-数据", dataType="Integer")
    private Integer type;

    @ApiModelProperty(name="state", value = "状态, 0-停用, 1-正常", dataType="Integer")
    private StateEnum state;
}
